1 GOTO910 2 PRINT"x[169][141][169][141]X` [234][255][169][255][133][145]L4[234]x[169]1[141][169][234][141]X` 3 [153]"xSTEPGINPUTSTOPSTEPINPUTONX` (null)(null)STEP(null)INPUTLISTLX(null)xSTEPUINPUTSTOPSTEP(null)INPUTONX` 4 PRINT"xhhh[170]h[168]hhhhhhh[152]H[138]HX` 5 [153]"hhhhhhh` 6 PRINT"[160][255][200][132][251][169][216][133][252] [241][183][138][162][160][255][200][145][251][136][208][251][230][252][202][208][246]` 7 [153]"NEWCLOSE(null)LEFT$>(null)ON(null)LET(null)(null)(null)(null)(null)(null)MID$(null)(null)` 35 IFUW=0THENSYSUU,15 40 POKEUC,0:POKEUN,0:UR$="":UI$="":IFUL=0THENUL=39 45 GETUI$:IFUI$=""THEN45 50 UA=ASC(UI$):UR=LEN(UR$):IFUA=13ANDUR>0THENPOKEUC,1:PRINT" [157]";:GOTO75 55 IFUA=20THENON-(UR=0)GOTO45:UR$=LEFT$(UR$,UR-1):PRINT"[157] [157][157]";:GOTO45 60 IFUR=ULTHEN45 65 GOSUB95:UR$=UR$+UI$:PRINTUI$;:GOTO45 75 FORUI=URTO1STEP-1:IFMID$(UR$,UI,1)=" "THENNEXT 80 UR$=LEFT$(UR$,UI):PRINT:RETURN 95 IFLEN(US$)=0THEN110 100 FORUI=1TOLEN(US$):IFUI$<>MID$(US$,UI,1)THENNEXT:UI$="" 105 RETURN 110 IFUA=46THENRETURN 115 IFUA=32ANDUR<>0THENRETURN 120 IFUA>47ANDUA<58THENRETURN 125 IFUA>64ANDUA<91THENRETURN 130 IFUA<193ORUA>218THENUI$="":RETURN 135 IFPEEK(UT)=UU%THENUI$=CHR$(UA-128) 140 RETURN 155 UZ=0:US$=UJ$:UG$=UK$:UT$=UL$:UP=UJ:UL=UK:PRINT"[147]";:POKEUY,0:POKEUX,0 160 POKEUT,UV%:POKE251,0:POKE252,UF:POKE253,0:POKE254,US/256:SYSUV:SYSUU,15 165 POKEU1,U1%:POKEU2,U2%:POKEU3,U3%-1:POKEU4,U4%:GOTO35 300 REM DERIVED FROM COMMODORE ONTARIO EDUCATIONAL SOFTWARE PROJECT 1983 305 REM PROJECT DIRECTOR: FRANK WINTER 310 REM PROJECT DIRECTOR: FRANK WINTER 320 REM PROGRAM NAME: EQUATION X-Y 330 REM WRITTEN BY: G. D. MAHAFFY 340 REM REVISED BY: DAVE MC CLURKIN 350 REM UPDATED BY: BILL CUMBERLAND 360 REM STUDENTS EXPERIMENT WITH GRAPHING LINES. 365 REM THEY WILL BE ABLE TO INPUT THEIR 370 REM OWN EQUATIONS WHICH THE COMPUTER WILL PLOT FOR THEM. 375 REM THE LIMITS OF THE GRAPH ARE AS FOLLOWS: 380 REM -18 <= (null) <= 20 385 REM -10 <= (null) <= 10 386 REM DUE TO THESE LIMITS, THE EQUATION" 387 [143] EQUATIONS THAT IS ENTERED, MUST 388 [143] NOT HAVE LARGER INTERCEPTS." 400 PRINT"[147]":POKEUT,UL%:POKEUY,0:POKEUX,0:POKE646,13 405 PRINT"  [201]NSTRUCTIONS [146] 412 [153]" (null)HIS IS A PROGRAM ON GRAPHING LINES. 414 PRINT" [212]HE GENERAL EQUATION USED IS:  [193][216] + [194][217] = [195] 416 [153]" (null)OU WILL BE ABLE TO CHOOSE VALUES FOR ATN, PEEK, AND LEN. 420 PRINT" [207]NCE THE EQUATION IS SET, THE COMPUTER WILL PLOT THE GRAPH. 422 [153]" (null)OU ARE ENCOURAGED TO EXPERIMENT WITH 424 PRINT" THE DIFFERENT VALUES FOR [193], [194], AND [195], 426 [153]" AND ALSO TO NOTICE THE CHANGES THAT 428 PRINT" THEY BRING ABOUT." 429 GOSUB820 430 PRINT"[147] [211]INCE THIS COMPUTER CANNOT HANDLE" 432 PRINT" VERY LARGE OR VERY SMALL NUMBERS, YOU" 434 PRINT" SHOULD INPUT NUMBERS THAT ARE BETWEEN -99 AND -999. 436 [153]" (null)HAT'S THE LIMIT, BUT NOT ALL OF THEM 438 PRINT" WILL BE PLOTTED ON THE GRAPH ON THE SCREEN. 440 [141]820 441 [153]"LOAD (null)HEN YOU INPUT ATN, PEEK AND LEN, TRY " 442 [153]" TO HAVE THEM ROUGHLY IN THE SAME BALL PARK. 444 PRINT" [201]N OTHER WORDS, DON'T USE VALUES 446 [153]" LIKE 1, 1, 200. " 448 [153]" (null)HIS WILL NOT BE PLOTTED BY THE COMPUTER." 495 [141]820:[142] 500 [143] SOUND 505 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130] 510 [151]54296,15:[151]54277,42:[151]54278,250 515 [151]54276,23:[151]54273,23:[151]54191,191 520 [129]TM[178]1[164]150:[151]54276,32:[129]TM[178]1[164]300:[130] 525 [151]54296,0:[142] 530 [143] SOUND 535 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130] 540 [151]54296,15:[151]54277,18:[151]54278,242 545 [151]54276,33:[151]54273,34[151]54191,48 550 [129]TM[178]1[164]300:[151]54276,32:[129]TM[178]1[164]400:[130] 555 [151]54296,0:[142] 560 [143] SOUND 565 SS[178]54272:[129]EE[178]SS[164]SS[170]28:[151]EE,0:[130] 570 [151]54296,7:[151]54277,42:[151]54278,250 575 [151]54276,23:[151]54273,23:[151]54191,191 580 [129]TM[178]1[164]30:[151]54276,32:[129]TM[178]1[164]50:[130] 585 [151]54296,0:[142] 590 [129]TM[178]1[164]500:[130]:[142] 591 [129]TM[178]1[164]1000:[130]:[142] 592 [129]TM[178]1[164]2000:[130]:[142] 595 [129]TM[178]1[164]5000:[130]:[142] 600 [143] ** PROGRAM MODIFICATION INST ** 605 UG$[178]"PROGRAM MOD":UP[178]0:[141]850 610 [153]" (null)HIS PROGRAM CAN BE MODIFIED TO" 612 [153]" PLOT TWO LINES AT A TIME. (null)HIS IS" 614 [153]" VERY USEFUL FOR COMPARISON OF SLOPES." 616 [153]" ATNLSO IT CAN BE USED TO SOLVE TWO" 618 [153]" EQUATIONS (I.E. IF THE POINT OF" 620 [153]" INTERSECTION IS WITHIN LIMITS OF THE" 622 [153]" GRAPH). (null)O MODIFY THE PROGRAM, FOLLOW" 623 [153]" THESE INSTRUCTIONS." 624 [141]835:[141]850 625 [153]" (null)YPE IN THESE LINES:" 626 [153][163]10)"1175 GOSUB 850:GOSUB 4200" 628 [153][163]10)"1516 GOTO 1520" 630 [153]" (null)OW THE COMPUTER WILL ASK FOR TWO" 632 [153]" EQUATIONS AND THEN PLOT THEM BOTH." 685 [141]835 690 [139]UZ[178]1[167][158]UP%:[137]155 695 [142] 700 [153]UC$"LOADBEFORE RUNNING THIS PROGRAM ON AN 8032 705 PRINT" LOAD THE 'CBM 4032' PROGRAM":END 800 PRINT"[147]";:POKEUT,UU%:POKEUY,0:POKEUX,0:POKE646,3 801 PRINT" A TPUG EDUCATIONAL PROGRAM":GOSUB590 802 PRINT" FOR C 64 COMPUTERS":GOSUB590 803 PRINT" [146]"; 804 PRINT" [146]"; 805 PRINT" GRAPHING [146]"; 806 PRINT" [146]"; 807 PRINT" EQUATION [146]"; 808 PRINT" [146]"; 809 PRINT" X-Y [146]"; 810 PRINT" [146]":GOSUB591:GOSUB560 811 PRINT" INSTRUCTIONS? Y/N 812 [161]R$:[139]R$[179][177]"Y"[175]R$[179][177]"N"[167]812 813 [139]R$[178]"Y"[167][141]400 814 [153]"LOAD AND AWAY WE GO .......":[141]591:[141]500:[141]590 815 [137]1000 820 [141]591:[141]560 822 [151]UN,0:[153][200](UD$,24);"CONT (null)RESS (null)(null)ATNLENVAL PEEKATN(null) TO CONTINUE WAIT" 824 [161]R$:[139]R$[179][177][199](32)[167]824 826 [142] 830 [141]591:[141]560 835 [151]UN,0:[153][200](UD$,24);"CONT (null)RESS (null)(null)ATNLENVAL PEEKATN(null) TO CONTINUE WAITLIST" 840 [161]R$:[139]R$[179][177][199](32)[167]840 845 [142] 850 UP[178]UP[170]1:[153]"LOAD"[200](UT$[170]UP$,21);[201](UP$[170]UG$[170][196](UP),18) 855 [153]" --------------------------------------" 860 [139]UH[178]0[167][153][200](UD$,24);[200](UP$,7);"HELP - PRESS H " 865 UH[178]0:[153]"":[142] 875 [153][200](UD$,24);" ONE MOMENT PLEASE... ":[142] 900 US[178]1024:U1[178]209:U2[178]210:U3[178]211:U4[178]214:UC[178]204:UB[178]2048:UX[178]53280:UD[178]2064 902 UT[178]53272:UU%[178]21:UL%[178]23:UP%[178]2151:UN[178]198:UY[178]53281:UU[178]2199:UE[178]2087 904 UC$[178][199](155):UV[178]1214:UF[178]196:UV[178]2238 905 UD$[178]"":UP$[178]" " 909 [142] 910 [141]900:[153]"LOAD " 920 [137]800 1000 [153]"LOAD"UC$;:[140]:[151]UY,0:[151]UX,0:[151]UT,UL% 1162 QQ[178]QQ[170]1:UP[178]QQ:UG$[178]" PLOT#":UT$[178]" EQUATION X-Y":[143] GO[211]850 1164 [153]" CHR$ENERAL EQUATION FOR A LINE:" 1165 [153][163]17)"AX + BY = C" 1167 [153]" RIGHT$NPUT VALUE FOR A: "; 1168 UL[178]3:US$[178]"0123456789-":[141]35:A[178][197](UR$) 1169 [153]" RIGHT$NPUT VALUE FOR B: "; 1170 UL[178]3:US$[178]"0123456789-":[141]35:B[178][197](UR$) 1172 [153]" RIGHT$NPUT VALUE FOR C: "; 1173 UL[178]3:US$[178]"0123456789-":[141]35:K[178][197](UR$) 1174 [141]830 1180 [143]:THE FOLLOWING SECTION PUTS THE X-Y AXIS ON THE SCREEN 1190 [153]"LOAD":[158] UU,15 1200 T[178][171]100 1210 [129] L[178]2 [164] 25 1220 P[178]93 1230 T[178](L[171]2)[173]5 1240 T1[178][181]((L[171]2)[173]5) 1250 [139] T[178]T1 [167] P[178]91 1260 [151] US[170](L[171]1)[172]40[170](19[171]1),P 1270 [130] L 1280 [129] C[178]1 [164] 40 1290 PP[178]64 1300 TT[178](C[170]1)[173]5:T2[178][181]((C[170]1)[173]5) 1310 [139] TT[178]T2 [167] PP[178]113 1320 [139] C[178]19 [167]PP[178]91 1330 [151] US[170](12[171]1)[172]40[170](C[171]1),PP 1340 [130] C 1350 [153]"-1-1-551X-AXIS" 1360 [153]"500" 1370 [153]"":[153][163]22)"Y-AXIS" 1380 [153]"10CMD5 1385 PRINT"-5[157][157]-10" 1390 PRINT"" 1440 FOR I=-18 TO 20 1450 X=I 1455 IF B=0THEN GOTO 4000 1460 Y=INT((K-A*X)/B+.5) 1470 IF Y=T GOTO 1510 1480 T=Y 1490 P=42 1500 GOSUB 1640 1510 NEXT I 1517 GOTO 1630 1520 T=-100 1530 FOR I=-18 TO 20 1540 P=43 1550 X=I 1555 IF E=0THEN GOTO 4000 1560 Y=INT((F-D*X)/E+.5) 1570 IF Y=T GOTO 1600 1580 T=Y 1590 GOSUB 1640 1600 NEXT I 1610 PRINT" "D"X+"D"Y="F":GO[211]595 1630 [141] 830:[153]"LOAD STR$O YOU WANT TO TRY ANOTHER ONE? "; 1631 UL[178]1:US$[178]"YN":[141]35:AN$[178]UR$:[139]AN$[179][177]"Y" [167] QQ[178]0:[137] 2000 1632 [141]500:[141]591:[140]:[137]1162 1640 [143]:THIS SUBROUTINE PLOTS THE X-Y COORDINATES 1650 C[178]X[170]19 1660 L1[178]12[171]Y 1670 [139] C[177]40 [137] 1720 1680 [139] C[179]1 [137] 1720 1690 [139] L1[177]24 [137] 1720 1700 [139] L1[179]1 [137] 1720 1709 PQ[178]US[170](L1[171]1)[172]40[170](C[171]1) 1710 [151] US[170](L1[171]1)[172]40[170](C[171]1),P 1711 [139] CC[178]0[175]A[179][177]0[167]1720 1712 [139] E[179][177]0[167] 1720 1715 [129]HH[178]PQ[164]PQ[170]39:[151]HH,P:[130]HH 1720 [142] 2000 [143] 2010 [153]"LOAD (null)ETURNING TO THE DISK MENU." 2020 [147]"MENU",8 2030 [138] 2040 [128] 4000 X[178]32826[170]K 4010 [129]V[178]X[164]X[170]920 [169]40 4020 [151]V,42 4030 [130] V 4040 [137] 1515 4200 [153]" CHR$ENERAL EQUATION FOR A LINE:" 4210 [153][163]17)"AX + BY = C" 4220 [153]" RIGHT$NPUT VALUE FOR A: "; 4230 UL[178]3:US$[178]"0123456789-H":[141]35:D[178][197](UR$) 4240 [153]" RIGHT$NPUT VALUE FOR B: "; 4250 UL[178]3:US$[178]"0123456789-H":[141]35:E[178][197](UR$) 4260 [153]" RIGHT$NPUT VALUE FOR C: "; 4270 UL[178]3:US$[178]"0123456789-H":[141]35:F[178][197](UR$) 4280 [141]830 4300 [142] 4500 [143] WHC 90:12:06